<{include file='public/head'}>
<div class="layui-body">
	<div class="layui-tab layui-tab-brief" lay-filter="tab">
	  <ul class="layui-tab-title">
	    <li class="layui-this" lay-id="t1">角色列表</li>
	    <li lay-id="t2">角色新增</li>
	  </ul>
	  <div class="layui-tab-content">
	  	   <div class="layui-tab-item layui-show">
	  	   		<table class="layui-table">
	            	<thead>
	                    <tr>
	                        <th>序号</th>
	                        <th>角色名称</th>
	                        <th>角色编码</th>
	                        <th>角色描述</th>
	                        <th>添加时间</th>
	                        <th>修改时间</th>
	                        <th>操作</th>
	                    </tr>
	        		</thead>
	                <tbody>
					<{volist name="$roles" id="value"}>
	                    <tr>
	                        <td><{$i}></td>
	                        <td><{$value->name}></td>
	                        <td><{$value->rcode}></td>
	                        <td><{$value->description}></td>
	                        <td><{$value->create_time}></td>
	                        <td><{$value->update_time}></td>
	                        <td>
	                        	<{if condition="$value->id neq 1"}>
	                           		<{:get_btn_del($value->rcode,'Role')}>
	                            <{/if}>
	                            <{:get_btn_mod($value->rcode,'Role')}>
	                        </td>
	                    </tr>
	                <{/volist}>
	                </tbody>
	            </table>
				<div class="page"><{$roles->render()}></div>
	  	   </div>
	  	   
	  	   <div class="layui-tab-item">
	  	   		<form action="<{:url('/Role/add')}>" method="post" class="layui-form">
	  	   			<input type="hidden" name="formcheck" value="<{$formcheck}>" > 
	  	   			<div class="layui-form-item">
	                     <label class="layui-form-label">角色名称</label>
	                     <div class="layui-input-block">
	                     	<input type="text" name="name" required  lay-verify="required" placeholder="请输入角色名称" class="layui-input">
	                     </div>
	                </div>
	                
	                <div class="layui-form-item">
	                     <label class="layui-form-label">角色描述</label>
	                     <div class="layui-input-block">
	                     	<input type="text" name="description" placeholder="请输入角色描述" class="layui-input">
	                     </div>
	                </div>
	                
	                <div class="layui-form-item">
					    <label class="layui-form-label">管辖区域</label>
					    <div class="layui-input-block">
					      <{$area_checkbox}>
					    </div>
					 </div>
					 
					 <div class="layui-form-item">
					    <label class="layui-form-label">角色权限</label>
					    <div class="layui-input-block" id="selectitem">
					      <{$menu_list}>
					    </div>
					 </div>
					 
		  	   		 <div class="layui-form-item">
						 <div class="layui-input-block">
						    <button class="layui-btn" lay-submit>立即提交</button>
						    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
						 </div>
				    </div>
	  	   		</form>
	  	   </div>
	  </div>
	</div>
</div>
<{include file='public/foot'}>